package com.franklin.ideaplugin.api.beans.variable.impl;

import com.franklin.ideaplugin.api.beans.variable.IVariable;
import com.intellij.psi.PsiLocalVariable;
import com.intellij.psi.PsiType;

/**
 * 本地变量
 *
 * @author Ye Junhui
 * @since 2024/3/6
 */
public class LocalVariableVariable implements IVariable<PsiLocalVariable> {

    private PsiLocalVariable psiLocalVariable;

    public LocalVariableVariable(PsiLocalVariable psiLocalVariable) {
        this.psiLocalVariable = psiLocalVariable;
    }

    @Override
    public String getName() {
        return this.psiLocalVariable.getName();
    }

    @Override
    public PsiLocalVariable getPsiElement() {
        return this.psiLocalVariable;
    }

    @Override
    public PsiType getPsiType() {
        return this.psiLocalVariable.getType();
    }
}
